In digital image processing, the image resulting from a Bayer color matrix must undergo color interpolation to restore the color of the image. Past methods generally used relationships of space or color to interpolate and restore color points. However, by these methods, abnormal points (also called outlying points) in the Bayer matrix would affect the interpolation of surrounding points, strongly influencing the effectiveness of the color interpolation. In addition, using any single method often resulted in the image having unclear edges or having false colors in the detail markups. These all have undesirable effects on color interpolation.